<h1>Listing contract_items</h1>

<table>
  <thead>
    <tr>
      <th>Product name</th>
      <th>Product desc</th>
      <th>Unit</th>
      <th>Quantity</th>
      <th>Unit price</th>
      <th>Tax rate</th>
      <th>Amount</th>
      <th>Total</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @contract_items.each do |contract_item| %>
      <tr>
        <td><%= contract_item.product_name %></td>
        <td><%= contract_item.product_desc %></td>
        <td><%= contract_item.unit %></td>
        <td><%= contract_item.quantity %></td>
        <td><%= contract_item.unit_price %></td>
        <td><%= contract_item.tax_rate %></td>
        <td><%= contract_item.amount %></td>
        <td><%= contract_item.total %></td>
        <td><%= link_to 'Show', contract_item %></td>
        <td><%= link_to 'Edit', edit_contract_item_path(contract_item) %></td>
        <td><%= link_to 'Destroy', contract_item, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Contract item', new_contract_item_path %>
